<?php

include_once('baseModeldto.php');
include_once('itemdto.php');

include_once($_SERVER['DOCUMENT_ROOT'] . '/smartrfid/model/item.php');
include_once($_SERVER['DOCUMENT_ROOT'] . '/smartrfid/model/ticket.php');

class Ticketdto extends BaseModeldto {
  public $id;
  public $identifier;
  public $items;
  
  function resolveRelations() {
    $i=new Item();
    $items = $i->loadByTicketId($this->id);
    $this->items =  array();
    foreach($items as $item) {
      array_push($this->items, new Itemdto($item));
    }
  }
  
}


?>
